/*
 * @Descripttion: 
 * @Author: 银河以北
 * @Date: 2023-05-19 19:23:57
 * @LastEditors: 银河以北
 * @LastEditTime: 2024-04-29 22:26:01
 */
import { createApp } from 'vue'

// 导入pinia
import { createPinia } from 'pinia'
const pinia = createPinia()

// import './style.css'
import App from './App.vue'

// 引入vue-router
import router from './router'

// 引入tailwindcss
import './style/tailwind.css'

// 引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'



//  highlight 的样式，依赖包，组件
import 'highlight.js/lib/common'
import hljsVuePlugin from '@highlightjs/vue-plugin'

import highlight from '@/directive/index'

const app = createApp(App)

app.use(pinia)
app.use(router)
app.use(ElementPlus)
app.use(hljsVuePlugin)

// 引入md5加密方式
import md5 from 'js-md5';

// 引入图片处理方法
import { imgUrl } from '@/utils/utils'

// 全局挂载方法
app.config.globalProperties.$utils = {
    md5, imgUrl
}

// 挂载预处理文件
import { preprocessUserInfo } from '@/utils/preprocess'
preprocessUserInfo(pinia)


// 挂载自定义指令
app.directive('highlight', highlight)
app.mount('#app')
